package com.data.boot.model;

import java.util.List;

/**
 * Created by dwk on 2019/6/5.
 */
public class Record {
    private List<Field> fields;
    private int len;

    public Record() {
    }

    public Record(List<Field> fields) {
        for (Field field : fields) {
            if (field.getFlag()) {
                len++;
            }
        }
        this.fields = fields;
    }

    public void setFields(List<Field> fields) {
        for (Field field : fields) {
            if (field.getFlag()) {
                len++;
            }
        }
        this.fields = fields;
    }

    public List<Field> getFields() {
        return fields;
    }

    public int getLen() {
        return len;
    }
}
